import React,{Component} from 'react'
import { Input, Button} from 'antd'
import {inject, observer} from 'mobx-react'
import "./index.less"
const { TextArea } = Input
/**
 * 名称：活动话术编辑
 * 描述：活动话术编辑
 * 调用：pages/creating-activity 创建活动
 * 输入： 
 * 时间：20220329 
 */
 @inject('activityStore')
 @observer
class ActivityEditMessage  extends Component{
    
    render(){
        const {activityStore} = this.props
        const {activityMessage} = activityStore
        return (
        <div className='message'>
             <div className='text-area'>
                <TextArea rows={8} placeholder="话术..."
                    value = {activityMessage}
                    onChange={e=>activityStore.setActivityMessage(e.target.value)}
                />
             </div>
             <div  className='button-list'>
                <p><Button className='button' onClick={()=>{activityStore.setActivityMessage(activityMessage+"${date}")}}>日期</Button></p>
                <p><Button className='button' onClick={()=>{activityStore.setActivityMessage(activityMessage+"${name}")}}>姓名</Button></p>
                <p><Button className='button' onClick={()=>{activityStore.setActivityMessage(activityMessage+"${cust_id}")}}>账号</Button></p>
                <p><Button className='button' onClick={()=>{activityStore.setActivityMessage(activityMessage+"${days_remaining}")}}>剩余天数</Button></p>
             </div>
        </div>
       
        )
    }

    

}

export default ActivityEditMessage
